Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make tracks and polygons clickable and make track points highlightable #95

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

smartyg
Copy link
Contributor

@smartyg smartyg commented Mar 19, 2022

Points on tracks and polygons which have the clickable property set will emit a point-clicked signal when the user left-clicks on a point. When the editable property is also set a then a click is only considered as a click when the mouse pointer does not move while the left button is down. In case the mouse is moved while the left button is down it is considered as a drag-n-drop action (thus emitting a point-changed signal).

The point-select signal is also emitted after a 'breaker' has been clicked (only when editable is set).

This patch also include code to highlight a point with a (custom) highlight color (only the alpha channel is the same as for non-highlighted points). Only one point per track can be highlighted. Highlighting a point works by passing a pointer to a OsmGpsMapPoint (which must be in the list of track points) as value for the highlight-point property.

Also two examples are included to demonstrate the use of the click and highlight usage. The second example illustrate these features combined with the editable property.

If there are any question, please don't hesitate to ask.

This is a rebased update from the old pull request (which I accidentally closed).

@johnny-bit
Copy link
Collaborator

Looks good, but GH CI keeps failing on unrelated task. I'll try to compile myself locally and give it a go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants